<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			if(document.referrer==""){
				alert("您必须通过location.html进入");
				window.location.replace("location.html");
			}
			function changedoc(){
				alert(document.referrer);
				alert(document.lastModified);
				document.title=window.prompt("请输入标题","");
				
			}
			function changeColor(){
				window.document.body.bgColor="red";
			}
		</script>
	</head>
	<body>
		<input type="button" value="改变" onclick="changedoc()"/>
		
		<input type="button" value="改变背景色" onclick="changeColor()"/>
	</body>
</html>
